<?php

/* 
 * Copyright 2015 gg.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace Com\Wechat\Crypt;
/**
 * error code 说明.
 * <ul>
 *    <li>-40001: 签名验证错误</li>
 *    <li>-40002: xml解析失败</li>
 *    <li>-40003: sha加密生成签名失败</li>
 *    <li>-40004: encodingAesKey 非法</li>
 *    <li>-40005: appid 校验错误</li>
 *    <li>-40006: aes 加密失败</li>
 *    <li>-40007: aes 解密失败</li>
 *    <li>-40008: 解密后得到的buffer非法</li>
 *    <li>-40009: base64加密失败</li>
 *    <li>-40010: base64解密失败</li>
 *    <li>-40011: 生成xml失败</li>
 * </ul>
 */
class ErrorCode{
    /**
     * 成功
     */
    public static $OK = 0;
    /**
     *签名验证错误
     */
    public static $ValidateSignatureError = -40001;
    /**
     *xml解析失败
     */
    public static $ParseXmlError = -40002;
    /**
     *sha加密生成签名失败
     */
    public static $ComputeSignatureError = -40003;
    /**
     *encodingAesKey 非法
     */
    public static $IllegalAesKey = -40004;
    /**
     *appid 校验错误
     */
    public static $ValidateAppidError = -40005;
    /**
     *aes 加密失败
     */
    public static $EncryptAESError = -40006;
    /**
     *aes 解密失败
     */
    public static $DecryptAESError = -40007;
    /**
     *解密后得到的buffer非法
     */
    public static $IllegalBuffer = -40008;
    /**
     *base64加密失败
     */
    public static $EncodeBase64Error = -40009;
    /**
     *base64解密失败
     */
    public static $DecodeBase64Error = -40010;
    /**
     *生成xml失败
     */
    public static $GenReturnXmlError = -40011;
}